package com.ruoyi.project.decision.controller;

import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.decision.domain.CcfScores;
import com.ruoyi.project.decision.domain.DecisionScores;
import com.ruoyi.project.decision.service.DataDecisionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/rest/data/management/enterprise")
public class DataDecisionController {
    @Autowired
    private DataDecisionService dataDecisionService;

    @Log(title = "筛选按钮2", businessType = BusinessType.OTHER)
    @GetMapping("/decision/query")
    public List<DecisionScores> getDecisionScores(String chainType, String scenario, int priorityType, int recommended) {
        return dataDecisionService.getDecisionScores(chainType, scenario, priorityType, recommended);
    }

    @GetMapping("/product/query")
    public List<String> getProductType(String chainType, String scenario, int priorityType) {
        return dataDecisionService.getProductType(chainType, scenario, priorityType);
    }

    @Log(title = "合作冲突关系数据", businessType = BusinessType.OTHER)
    @GetMapping("/ccf/scores/query")
    public List<CcfScores> getCcfScores(String chainType, String scenario, String enterprise) {
        return dataDecisionService.getCcfScores(chainType, scenario, enterprise);
    }

    @Log(title = "筛选按钮1", businessType = BusinessType.OTHER)
    @GetMapping("/ccf/enterprise/query")
    public List<String> getEnterprises(String chainType, String scenario) {
        return dataDecisionService.getEnterprises(chainType, scenario);
    }

}
